package org.fing.edu.uy.esbadp.core.entity;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;

import org.fing.edu.uy.esbadp.core.constants.ConfigConstants;

@XmlRootElement(name = ConfigConstants.STRATEGIES_ELEMENT)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlSeeAlso({DMAdpRequirementsName.class})
public class DMAdpStrategy implements Serializable {
	
	private static final long serialVersionUID = 5321069333046613373L;
	
	String name;	
	String description;
	String className;
	@XmlElement(name=ConfigConstants.STRATEGIES_SUPPORTED_STRATEGIES)
	DMAdpRequirementsName supported_requirement;
	
	public DMAdpStrategy(){
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public DMAdpRequirementsName getSupported_requirement() {
		return supported_requirement;
	}

	public void setSupported_requirement(
			DMAdpRequirementsName supported_requirement) {
		this.supported_requirement = supported_requirement;
	}

	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("  name:");
		sb.append(name);
		sb.append("\n");		
		sb.append("  description:");
		sb.append(description);
		sb.append("\n");		
		sb.append("  class:");
		sb.append(className);
		sb.append("\n");
		sb.append("  supported-requirements ->\n");
		sb.append(supported_requirement.toString());
		return sb.toString();	
	}
	
}
